package com.shark.example.controllers
{
	import com.shark.example.events.LoginEvent;

	public class ApplicationController
	{
		private static const LOGIN_VIEW:int = 0;
		private static const MAIN_VIEW:int = 1;
		
		[Bindable]
		public var visibleView:int;
	
		public function ApplicationController()
		{
		}

		[EventHandler ( event="LoginEvent.LOGIN_SUCCESS")]
		public function loginSuccess(event:LoginEvent):void{
			visibleView = MAIN_VIEW;
		}
		[EventHandler ( event="LoginEvent.LOGOUT_SUCCESS")]
		public function logoutSuccess(event:LoginEvent):void{
			visibleView = LOGIN_VIEW;
		}
	}
}